Skip to content

Conversation

@michaelm-openai
Copy link

@michaelm-openai michaelm-openai commented Jan 13, 2026

Fixes #11001

Related to typing python/typing#256

Expected behavior changes under this flag:

  • str and its subtypes are no longer treated as subtypes of Collection, Iterable, Sequence or protocols that extend them. Assignment and argument passing will be treated as errors.
  • The builtin iter() method has an additional overload which accepts str. This is the recommended way to iterate over characters when this flag is enabled.
  • Invalid assignment of str to subtypes of Container, such as Collection will not report a conflict on the __contains__ method, since this introduces noise. It is known that str does not conform to the Container protocol due to its incompatible signature for __contains__ method.

def __getitem__(self, i: int, /) -> _T_co: ...

@overload
def iter(object: str, /) -> Iterable[str]: ...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be in a patch file, or it will be overwritten next time we sync typeshed. Look for similar patch files in the repo (there are a few related to LiteralString).

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@michaelm-openai
Copy link
Author

I think the apprise diff is expected given that we added a new overload. The full diagnostic is:

apprise/config/base.py:1509: error: No overload variant of "iter" matches argument type "None"  [call-overload]
apprise/config/base.py:1509: note: Possible overload variants:
apprise/config/base.py:1509: note:     def [_SupportsNextT_co: SupportsNext[Any]] iter(SupportsIter[_SupportsNextT_co], /) -> _SupportsNextT_co
apprise/config/base.py:1509: note:     def iter(str, /) -> Iterator[str]
apprise/config/base.py:1509: note:     def [_T] iter(_GetItemIterable[_T], /) -> Iterator[_T]
apprise/config/base.py:1509: note:     def [_T] iter(Callable[[], _T | None], None, /) -> Iterator[_T]
apprise/config/base.py:1509: note:     def [_T] iter(Callable[[], _T], object, /) -> Iterator[_T]

@github-actions

This comment has been minimized.

@michaelm-openai michaelm-openai force-pushed the michaelm/disallow-str-iteration branch from 9170fb1 to 473a4a1 Compare January 15, 2026 04:14
@github-actions

This comment has been minimized.

@michaelm-openai michaelm-openai force-pushed the michaelm/disallow-str-iteration branch from 473a4a1 to ab25cde Compare January 15, 2026 08:13
@michaelm-openai michaelm-openai force-pushed the michaelm/disallow-str-iteration branch from 09762a7 to 41bb4d3 Compare January 15, 2026 09:00
@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

beartype (https://github.com/beartype/beartype)
+ beartype/_data/kind/datakindtext.py:18: error: Argument 1 to "frozenset" has incompatible type "str"; expected "Iterable[str]"  [arg-type]

spack (https://github.com/spack/spack)
+ lib/spack/spack/schema/mirrors.py:103: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Collection[object]"  [dict-item]
+ lib/spack/spack/schema/mirrors.py:107: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Collection[object]"  [dict-item]
+ lib/spack/spack/schema/modules.py:48: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Collection[str]"  [dict-item]
+ lib/spack/spack/schema/modules.py:52: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Collection[str]"  [dict-item]
+ lib/spack/spack/schema/modules.py:56: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Iterable[str]"  [dict-item]
+ lib/spack/spack/schema/modules.py:61: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Iterable[str]"  [dict-item]
+ lib/spack/spack/schema/modules.py:95: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Iterable[str]"  [dict-item]
+ lib/spack/spack/schema/modules.py:100: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Iterable[str]"  [dict-item]
+ lib/spack/spack/schema/modules.py:110: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Iterable[str]"  [dict-item]
+ lib/spack/spack/schema/modules.py:154: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Iterable[str]"  [dict-item]
+ lib/spack/spack/schema/modules.py:159: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Iterable[str]"  [dict-item]
+ lib/spack/spack/schema/modules.py:164: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Iterable[str]"  [dict-item]
+ lib/spack/spack/schema/modules.py:219: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Iterable[str]"  [dict-item]
+ lib/spack/spack/install_test.py:521: error: Argument 1 to "join" of "str" has incompatible type "Any | str"; expected "Iterable[str]"  [arg-type]
+ lib/spack/spack/test/spec_yaml.py:330: error: List item 0 has incompatible type "tuple[str, str]"; expected "tuple[str, Collection[str]]"  [list-item]
+ lib/spack/spack/test/spec_yaml.py:331: error: List item 1 has incompatible type "tuple[str, str]"; expected "tuple[str, Collection[str]]"  [list-item]
+ lib/spack/spack/cmd/info.py:151: error: Argument 1 to "zip" has incompatible type "str"; expected "Iterable[str]"  [arg-type]

CPython (Argument Clinic) (https://github.com/python/cpython)
+ Tools/clinic/libclinic/codegen.py:161: error: Argument 1 to "join" of "str" has incompatible type "str"; expected "Iterable[str]"  [arg-type]

com2ann (https://github.com/ilevkivskyi/com2ann)
+ src/com2ann.py:436: error: Iterating over "str" is disallowed  [misc]
+ src/com2ann.py:436: note: This is because --disallow-str-iteration is enabled
+ src/com2ann.py:633: error: Argument 1 to "enumerate" has incompatible type "str"; expected "Iterable[str]"  [arg-type]

optuna (https://github.com/optuna/optuna)
+ tests/storages_tests/rdb_tests/test_storage.py:366: error: Argument 2 to "OperationalError" has incompatible type "str"; expected "Sequence[Sequence[Any]] | Sequence[Mapping[str, Any]] | Sequence[Any] | Mapping[str, Any] | None"  [arg-type]
+ tests/visualization_tests/test_hypervolume_history.py:26: error: Iterating over "str" is disallowed  [misc]
+ tests/visualization_tests/test_hypervolume_history.py:26: note: This is because --disallow-str-iteration is enabled
+ tests/visualization_tests/test_hypervolume_history.py:52: error: Argument "directions" to "create_study" has incompatible type "str"; expected "Sequence[str | StudyDirection] | None"  [arg-type]
+ tests/study_tests/test_study.py:177: error: Argument "directions" to "create_study" has incompatible type "str"; expected "Sequence[str | StudyDirection] | None"  [arg-type]
+ tests/samplers_tests/test_grid.py:52: error: Non-overlapping equality check (left operand type: "set[tuple[str | float | int | None, ...]]", right operand type: "set[tuple[Sequence[str | float | int | bool | None], ...]]")  [comparison-overlap]
+ optuna/visualization/_parallel_coordinate.py:289: error: Dict entry 0 has incompatible type "str": "str"; expected "str": "Sequence[object]"  [dict-item]
+ optuna/visualization/_parallel_coordinate.py:297: error: Dict entry 0 has incompatible type "str": "str"; expected "str": "Sequence[object]"  [dict-item]

spark (https://github.com/apache/spark)
+ python/pyspark/sql/variant_utils.py:677: error: Iterating over "str" is disallowed  [misc]
+ python/pyspark/sql/variant_utils.py:677: note: This is because --disallow-str-iteration is enabled
+ python/pyspark/sql/classic/dataframe.py:1516: error: Iterating over "str | list[str]" is disallowed  [misc]
+ python/pyspark/sql/classic/dataframe.py:1516: note: This is because --disallow-str-iteration is enabled
+ python/pyspark/pandas/frame.py:7331: error: Argument 1 to "list" has incompatible type "str | list[str] | None"; expected "Iterable[str]"  [arg-type]
+ python/pyspark/pandas/frame.py:7336: error: Argument 1 to "list" has incompatible type "str | list[str] | None"; expected "Iterable[str]"  [arg-type]
+ python/pyspark/sql/connect/dataframe.py:1588: error: Iterating over "str | list[str]" is disallowed  [misc]
+ python/pyspark/sql/connect/dataframe.py:1588: note: This is because --disallow-str-iteration is enabled
+ python/pyspark/sql/connect/dataframe.py:1635: error: Argument 1 to "list" has incompatible type "str | list[str]"; expected "Iterable[str]"  [arg-type]

hydpy (https://github.com/hydpy-dev/hydpy)
+ hydpy/cythons/modelutils.py:2806: error: Iterating over "str" is disallowed  [misc]
+ hydpy/cythons/modelutils.py:2806: note: This is because --disallow-str-iteration is enabled
+ hydpy/core/timetools.py:527: error: Argument 1 to "enumerate" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ hydpy/auxs/networktools.py:188: error: Argument 1 to "zip" has incompatible type "RiverBasinNumber"; expected "Iterable[str]"  [arg-type]
+ hydpy/auxs/networktools.py:188: error: Argument 2 to "zip" has incompatible type "RiverBasinNumber"; expected "Iterable[str]"  [arg-type]
+ hydpy/auxs/networktools.py:273: error: Iterating over "RiverBasinNumber" is disallowed  [misc]
+ hydpy/auxs/networktools.py:273: note: This is because --disallow-str-iteration is enabled
+ hydpy/auxs/networktools.py:368: error: Iterating over "RiverBasinNumber" is disallowed  [misc]
+ hydpy/auxs/networktools.py:368: note: This is because --disallow-str-iteration is enabled
+ hydpy/auxs/interptools.py:160: error: Argument 1 to "product" has incompatible type "str | list[str]"; expected "Iterable[str]"  [arg-type]
+ hydpy/auxs/interptools.py:160: error: Argument 2 to "product" has incompatible type "str | list[str]"; expected "Iterable[str]"  [arg-type]

psycopg (https://github.com/psycopg/psycopg)
+ psycopg/psycopg/errors.py:80: error: Argument 1 to "OperationalError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/errors.py:556: error: Argument 1 to "Error" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_encodings.py:130: error: Argument 1 to "NotSupportedError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/rows.py:216: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/rows.py:234: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_struct.py:49: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_py_transformer.py:183: error: Argument 1 to "DataError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_py_transformer.py:277: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_py_transformer.py:302: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_py_transformer.py:306: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_py_transformer.py:321: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_py_transformer.py:325: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_py_transformer.py:338: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_py_transformer.py:355: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_conninfo_utils.py:34: error: Argument 1 to "OperationalError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_conninfo_utils.py:42: error: Argument 1 to "OperationalError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_conninfo_attempts_async.py:46: error: Argument 1 to "OperationalError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_conninfo_attempts.py:48: error: Argument 1 to "OperationalError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/conninfo.py:103: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/conninfo.py:140: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_connection_info.py:53: error: Argument 1 to "InternalError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/transaction.py:239: error: Argument 1 to "OutOfOrderTransactionNesting" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_typeinfo.py:139: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_capabilities.py:110: error: Argument 1 to "NotSupportedError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/waiting.py:47: error: Argument 1 to "OperationalError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/waiting.py:160: error: Argument 1 to "InternalError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/waiting.py:181: error: Argument 1 to "OperationalError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/waiting.py:221: error: Argument 1 to "InternalError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/waiting.py:274: error: Argument 1 to "OperationalError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/waiting.py:285: error: Argument 1 to "OperationalError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/waiting.py:394: error: Argument 1 to "OperationalError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_adapters_map.py:228: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_adapters_map.py:260: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/generators.py:81: error: Argument 1 to "OperationalError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/generators.py:92: error: Argument 1 to "ConnectionTimeout" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/generators.py:101: error: Argument 1 to "OperationalError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/generators.py:106: error: Argument 1 to "InternalError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/generators.py:117: error: Argument 1 to "CancellationTimeout" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/generators.py:127: error: Argument 1 to "OperationalError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/generators.py:130: error: Argument 1 to "InternalError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/generators.py:274: error: Argument 1 to "NotSupportedError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/generators.py:326: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_tstrings.py:49: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_tstrings.py:74: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_tstrings.py:86: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_tstrings.py:102: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_tstrings.py:115: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_tstrings.py:141: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_queries.py:141: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_queries.py:161: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_queries.py:238: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_queries.py:418: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_queries.py:424: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_queries.py:429: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_queries.py:441: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_queries.py:483: error: Argument 1 to "NotSupportedError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_pipeline_base.py:168: error: Argument 1 to "PipelineAborted" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_copy_base.py:87: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_copy_base.py:264: error: Argument 1 to "DataError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/types/string.py:52: error: Argument 1 to "DataError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_cursor_base.py:365: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_cursor_base.py:380: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_cursor_base.py:396: error: Argument 1 to "NotSupportedError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_cursor_base.py:410: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_cursor_base.py:475: error: Argument 1 to "InternalError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_cursor_base.py:493: error: Argument 1 to "PipelineAborted" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_cursor_base.py:496: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_cursor_base.py:500: error: Argument 1 to "InternalError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_cursor_base.py:603: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_cursor_base.py:606: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_cursor_base.py:613: error: Argument 1 to "PipelineAborted" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_cursor_base.py:624: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_cursor_base.py:638: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_connection_base.py:260: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_connection_base.py:265: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_connection_base.py:313: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_connection_base.py:486: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_connection_base.py:523: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_connection_base.py:532: error: Argument 1 to "OperationalError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_connection_base.py:534: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_connection_base.py:574: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_connection_base.py:580: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_connection_base.py:594: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_connection_base.py:600: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_connection_base.py:638: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_connection_base.py:644: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_connection_base.py:653: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_connection_base.py:657: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_connection_base.py:672: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_connection_base.py:679: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/cursor_async.py:166: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/cursor.py:166: error: Argument 1 to "ProgrammingError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_server_cursor_base.py:167: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/client_cursor.py:62: error: Argument 1 to "NotSupportedError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_server_cursor_async.py:90: error: Argument 1 to "NotSupportedError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_server_cursor_async.py:105: error: Argument 1 to "NotSupportedError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_server_cursor.py:91: error: Argument 1 to "NotSupportedError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/_server_cursor.py:106: error: Argument 1 to "NotSupportedError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/connection_async.py:145: error: Argument 1 to "Error" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/connection_async.py:597: error: Argument 1 to "NotSupportedError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/connection.py:129: error: Argument 1 to "Error" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/connection.py:542: error: Argument 1 to "NotSupportedError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/types/range.py:441: error: Argument 1 to "InternalError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/types/range.py:467: error: Argument 1 to "DataError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/types/numeric.py:342: error: Argument 1 to "DataError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/types/json.py:280: error: Argument 1 to "DataError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/types/enum.py:91: error: Argument 1 to "DataError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/types/datetime.py:76: error: Argument 1 to "DataError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/types/datetime.py:246: error: Argument 1 to "InterfaceError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/types/datetime.py:267: error: Argument 1 to "DataError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/types/datetime.py:269: error: Argument 1 to "DataError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/types/datetime.py:271: error: Argument 1 to "DataError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/types/datetime.py:283: error: Argument 1 to "DataError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/types/datetime.py:285: error: Argument 1 to "DataError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]
+ psycopg/psycopg/types/datetime.py:294: error: Argument 1 to "DataError" has incompatible type "str"; expected "Sequence[Any]"  [arg-type]

... (truncated 61 lines) ...

tornado (https://github.com/tornadoweb/tornado)
+ tornado/util.py:179: error: Argument 1 to "frozenset" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ tornado/test/escape_test.py:260: error: List item 0 has incompatible type "tuple[str, str, str]"; expected "tuple[str, Sequence[object], str | None]"  [list-item]
+ tornado/test/escape_test.py:261: error: List item 1 has incompatible type "tuple[str, str, str]"; expected "tuple[str, Sequence[object], str | None]"  [list-item]
+ tornado/test/tcpserver_test.py:158: error: Argument 1 to "sorted" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ tornado/test/tcpserver_test.py:180: error: Argument 1 to "sorted" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ tornado/test/tcpserver_test.py:202: error: Argument 1 to "sorted" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ tornado/test/tcpserver_test.py:229: error: Argument 1 to "sorted" has incompatible type "str"; expected "Iterable[str]"  [arg-type]

mongo-python-driver (https://github.com/mongodb/mongo-python-driver)
+ pymongo/saslprep.py:88: error: Iterating over "str" is disallowed  [misc]
+ pymongo/saslprep.py:88: note: This is because --disallow-str-iteration is enabled
+ bson/decimal128.py:305: error: Iterating over "str" is disallowed  [misc]
+ bson/decimal128.py:305: note: This is because --disallow-str-iteration is enabled
+ pymongo/uri_parser_shared.py:201: error: Iterating over "str" is disallowed  [misc]
+ pymongo/uri_parser_shared.py:201: note: This is because --disallow-str-iteration is enabled
+ pymongo/uri_parser_shared.py:202: error: Iterating over "str" is disallowed  [misc]
+ pymongo/uri_parser_shared.py:202: note: This is because --disallow-str-iteration is enabled
+ pymongo/helpers_shared.py:142: error: Expected iterable as variadic argument  [misc]
+ pymongo/compression_support.py:64: error: Argument 1 to "list" has incompatible type "str | Iterable[str]"; expected "Iterable[str | Any]"  [arg-type]

prefect (https://github.com/PrefectHQ/prefect)
+ src/prefect/_sdk/naming.py:110: error: Iterating over "str" is disallowed  [misc]
+ src/prefect/_sdk/naming.py:110: note: This is because --disallow-str-iteration is enabled
+ src/prefect/_sdk/naming.py:180: error: Iterating over "str" is disallowed  [misc]
+ src/prefect/_sdk/naming.py:180: note: This is because --disallow-str-iteration is enabled
+ src/prefect/utilities/urls.py:123: error: Iterating over "str | Any" is disallowed  [misc]
+ src/prefect/utilities/urls.py:123: note: This is because --disallow-str-iteration is enabled
- src/prefect/deployments/runner.py:641: error: Incompatible types in assignment (expression has type "list[Iterable[str] | Iterable[int | float | timedelta] | int | float | timedelta | None]", variable has type "Iterable[str] | Iterable[int | float | timedelta] | int | float | timedelta | None")  [assignment]
+ src/prefect/deployments/runner.py:641: error: Incompatible types in assignment (expression has type "list[Iterable[str] | str | Iterable[int | float | timedelta] | int | float | timedelta | None]", variable has type "Iterable[str] | str | Iterable[int | float | timedelta] | int | float | timedelta | None")  [assignment]
- src/prefect/deployments/runner.py:653: error: Item "None" of "Iterable[str] | Iterable[int | float | timedelta] | int | float | timedelta | None" has no attribute "__iter__" (not iterable)  [union-attr]
- src/prefect/deployments/runner.py:653: error: Item "int" of "Iterable[str] | Iterable[int | float | timedelta] | int | float | timedelta | None" has no attribute "__iter__" (not iterable)  [union-attr]
+ src/prefect/deployments/runner.py:653: error: Iterating over "Iterable[str] | str | Iterable[int | float | timedelta] | int | float | timedelta | None" is disallowed  [misc]
+ src/prefect/deployments/runner.py:653: note: This is because --disallow-str-iteration is enabled
- src/prefect/deployments/runner.py:653: error: Item "float" of "Iterable[str] | Iterable[int | float | timedelta] | int | float | timedelta | None" has no attribute "__iter__" (not iterable)  [union-attr]
+ src/prefect/deployments/runner.py:653: error: Item "None" of "Iterable[str] | str | Iterable[int | float | timedelta] | int | float | timedelta | None" has no attribute "__iter__" (not iterable)  [union-attr]
- src/prefect/deployments/runner.py:653: error: Item "timedelta" of "Iterable[str] | Iterable[int | float | timedelta] | int | float | timedelta | None" has no attribute "__iter__" (not iterable)  [union-attr]
+ src/prefect/deployments/runner.py:653: error: Item "int" of "Iterable[str] | str | Iterable[int | float | timedelta] | int | float | timedelta | None" has no attribute "__iter__" (not iterable)  [union-attr]
+ src/prefect/deployments/runner.py:653: error: Item "float" of "Iterable[str] | str | Iterable[int | float | timedelta] | int | float | timedelta | None" has no attribute "__iter__" (not iterable)  [union-attr]
+ src/prefect/deployments/runner.py:653: error: Item "timedelta" of "Iterable[str] | str | Iterable[int | float | timedelta] | int | float | timedelta | None" has no attribute "__iter__" (not iterable)  [union-attr]
+ src/prefect/cli/cloud/__init__.py:226: error: Argument 1 to "enumerate" has incompatible type "list[str] | list[tuple[T, str]]"; expected "Iterable[Sequence[T | str]]"  [arg-type]
+ src/prefect/infrastructure/provisioners/ecs.py:1345: error: Iterating over "str | Any" is disallowed  [misc]
+ src/prefect/infrastructure/provisioners/ecs.py:1345: note: This is because --disallow-str-iteration is enabled
+ src/prefect/infrastructure/provisioners/container_instance.py:637: error: Iterating over "str | dict[str, Any]" is disallowed  [misc]
+ src/prefect/infrastructure/provisioners/container_instance.py:637: note: This is because --disallow-str-iteration is enabled

pydantic (https://github.com/pydantic/pydantic)
+ pydantic/v1/color.py:59: error: Iterating over "str" is disallowed  [misc]
+ pydantic/v1/color.py:59: note: This is because --disallow-str-iteration is enabled
+ pydantic/v1/schema.py:515: error: Dict entry 0 has incompatible type "str": "str"; expected "str": "Sequence[Collection[str]]"  [dict-item]
+ pydantic/color.py:68: error: Iterating over "str" is disallowed  [misc]
+ pydantic/color.py:68: note: This is because --disallow-str-iteration is enabled
+ pydantic/v1/_hypothesis_plugin.py:124: error: Iterating over "str" is disallowed  [misc]
+ pydantic/v1/_hypothesis_plugin.py:124: note: This is because --disallow-str-iteration is enabled

PyGithub (https://github.com/PyGithub/PyGithub)
+ github/Repository.py:1970: error: Incompatible types in assignment (expression has type "str", target has type "Sequence[Collection[str]]")  [assignment]
+ github/Repository.py:1976: error: Incompatible types in assignment (expression has type "str", target has type "Sequence[Collection[str]]")  [assignment]
+ github/Repository.py:1978: error: Incompatible types in assignment (expression has type "str", target has type "Sequence[Collection[str]]")  [assignment]

pylox (https://github.com/sco1/pylox)
+ pylox/builtins/py_builtins.py:358: error: Argument 1 to "_lox_arrayize" has incompatible type "str"; expected "Iterable[Any]"  [arg-type]
+ tests/builtins/test_loxarrayize.py:9: error: Argument 1 to "deque" has incompatible type "str"; expected "Iterable[str]"  [arg-type]

mkosi (https://github.com/systemd/mkosi)
+ mkosi/versioncomp.py:26:35: error: Expected iterable as variadic argument  [misc]
+ mkosi/versioncomp.py:27:35: error: Argument 1 to "enumerate" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ mkosi/versioncomp.py:33:78: error: Argument 2 to "takewhile" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ mkosi/versioncomp.py:36:85: error: Argument 2 to "takewhile" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ mkosi/config.py:4638:18: error: Iterating over "str" is disallowed  [misc]
+ mkosi/config.py:4638:18: note: This is because --disallow-str-iteration is enabled
+ mkosi/config.py:4643:31: error: Argument 1 to "__iadd__" of "list" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ mkosi/config.py:4652:31: error: Argument 1 to "__iadd__" of "list" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ mkosi/config.py:4673:35: error: Argument 1 to "__iadd__" of "list" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ mkosi/config.py:4679:27: error: Argument 1 to "__iadd__" of "list" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ mkosi/config.py:4682:23: error: Argument 1 to "__iadd__" of "list" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ mkosi/config.py:6036:91: error: Iterating over "str" is disallowed  [misc]
+ mkosi/config.py:6036:91: note: This is because --disallow-str-iteration is enabled
+ mkosi/__init__.py:2219:49: error: Iterating over "str" is disallowed  [misc]
+ mkosi/__init__.py:2219:49: note: This is because --disallow-str-iteration is enabled

bandersnatch (https://github.com/pypa/bandersnatch)
+ src/bandersnatch/configuration.py: note: In member "__init__" of class "BandersnatchConfig":
+ src/bandersnatch/configuration.py:77: error: Argument "delimiters" to "__init__" of "RawConfigParser" has incompatible type "str"; expected "Sequence[str]"  [arg-type]

aiohttp (https://github.com/aio-libs/aiohttp)
+ aiohttp/hdrs.py:114:41: error: Argument 1 to "zip" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ aiohttp/hdrs.py:114:60: error: Argument 2 to "zip" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ aiohttp/hdrs.py:117:41: error: Argument 1 to "zip" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ aiohttp/hdrs.py:117:63: error: Argument 2 to "zip" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ aiohttp/hdrs.py:120:41: error: Argument 1 to "zip" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ aiohttp/hdrs.py:120:55: error: Argument 2 to "zip" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ aiohttp/helpers.py:420:28: error: Argument 1 to "set" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ aiohttp/helpers.py:448:41: error: Argument 1 to "set" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ aiohttp/helpers.py:455:44: error: Argument 1 to "set" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ aiohttp/http_parser.py:59:33: error: Argument 1 to "set" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ aiohttp/multipart.py:77:46: error: Argument 1 to "set" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
- aiohttp/web_log.py:197: error: Unused "type: ignore" comment  [unused-ignore]
- aiohttp/web_log.py:198: error: Unused "type: ignore[has-type]" comment  [unused-ignore]
- aiohttp/web_log.py:199: error: Unused "type: ignore[has-type]" comment  [unused-ignore]
- aiohttp/web_log.py:200: error: Unused "type: ignore[has-type]" comment  [unused-ignore]

colour (https://github.com/colour-science/colour)
+ colour/utilities/verbose.py:234: error: Argument 1 to "chain" has incompatible type "*list[str | list[str]]"; expected "Iterable[str]"  [arg-type]
+ colour/geometry/primitives.py:375: error: Iterating over "Literal['-x', '+x', '-y', '+y', '-z', '+z', 'xy', 'xz', 'yz', 'yx', 'zx', 'zy']" is disallowed  [misc]
+ colour/geometry/primitives.py:375: note: This is because --disallow-str-iteration is enabled
+ colour/io/ctl.py:428: error: Incompatible types in assignment (expression has type "Collection[str]", variable has type "Sequence[str] | None")  [assignment]
+ colour/io/ctl.py:428: error: Argument 2 to "optional" has incompatible type "str"; expected "Collection[str]"  [arg-type]
+ colour/io/ctl.py:553: error: Incompatible types in assignment (expression has type "Collection[str]", variable has type "Sequence[str] | None")  [assignment]
+ colour/io/ctl.py:553: error: Argument 2 to "optional" has incompatible type "str"; expected "Collection[str]"  [arg-type]
+ colour/plotting/common.py:881: error: Iterating over "str" is disallowed  [misc]
+ colour/plotting/common.py:881: note: This is because --disallow-str-iteration is enabled
+ colour/plotting/common.py:886: error: Argument 2 to "zip" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ colour/plotting/volume.py:257: error: Argument 1 to "enumerate" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ colour/plotting/volume.py:285: error: Argument 1 to "enumerate" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ colour/plotting/volume.py:626: error: Argument 1 to "enumerate" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ colour/plotting/volume.py:634: error: Argument 1 to "enumerate" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ colour/plotting/temperature.py:617: error: Argument 1 to "optional" has incompatible type "str | Sequence[str] | None"; expected "Sequence[str] | None"  [arg-type]
+ colour/utilities/tests/test_array.py:536: error: Argument 1 to "zip" has incompatible type "str"; expected "Iterable[str]"  [arg-type]

python-chess (https://github.com/niklasf/python-chess)
+ chess/__init__.py:1186: error: Iterating over "str" is disallowed  [misc]
+ chess/__init__.py:1186: note: This is because --disallow-str-iteration is enabled
+ chess/__init__.py:1213: error: Iterating over "str" is disallowed  [misc]
+ chess/__init__.py:1213: note: This is because --disallow-str-iteration is enabled
+ chess/__init__.py:2746: error: Iterating over "str" is disallowed  [misc]
+ chess/__init__.py:2746: note: This is because --disallow-str-iteration is enabled
+ chess/__init__.py:2928: error: Argument 1 to "chain" has incompatible type "str"; expected "Iterable[str | None]"  [arg-type]
+ chess/variant.py:841: error: Incompatible default for argument "symbols" (default has type "str", argument has type "Iterable[str]")  [assignment]
+ chess/variant.py:1036: error: Iterating over "str" is disallowed  [misc]
+ chess/variant.py:1036: note: This is because --disallow-str-iteration is enabled
+ chess/variant.py:1037: error: Iterating over "str" is disallowed  [misc]
+ chess/variant.py:1037: note: This is because --disallow-str-iteration is enabled
+ chess/syzygy.py:388: error: Argument 1 to "sorted" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ chess/syzygy.py:389: error: Argument 1 to "sorted" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ chess/syzygy.py:390: error: Iterating over "str" is disallowed  [misc]
+ chess/syzygy.py:390: note: This is because --disallow-str-iteration is enabled
+ chess/engine.py:2498: error: Iterating over "str" is disallowed  [misc]
+ chess/engine.py:2498: note: This is because --disallow-str-iteration is enabled

mypy_primer (https://github.com/hauntsaninja/mypy_primer)
+ mypy_primer/utils.py:92: error: Argument 1 to "join" has incompatible type "str | list[str]"; expected "Iterable[str]"  [arg-type]

zipp (https://github.com/jaraco/zipp)
+ zipp/glob.py:25: error: Argument 1 to "set" has incompatible type "str"; expected "Iterable[str]"  [arg-type]

meson (https://github.com/mesonbuild/meson)
+ mesonbuild/depfile.py:19:18: error: Iterating over "str" is disallowed  [misc]
+ mesonbuild/depfile.py:19:18: note: This is because --disallow-str-iteration is enabled
+ mesonbuild/utils/universal.py:1161:17: error: Iterating over "str" is disallowed  [misc]
+ mesonbuild/utils/universal.py:1161:17: note: This is because --disallow-str-iteration is enabled
+ mesonbuild/utils/universal.py:1182:18: error: Iterating over "str" is disallowed  [misc]
+ mesonbuild/utils/universal.py:1182:18: note: This is because --disallow-str-iteration is enabled
+ mesonbuild/utils/universal.py:1204:18: error: Iterating over "str" is disallowed  [misc]
+ mesonbuild/utils/universal.py:1204:18: note: This is because --disallow-str-iteration is enabled
+ mesonbuild/utils/universal.py:1904:27: error: Argument 1 to "__iadd__" of "list" has incompatible type "str | list[str]"; expected "Iterable[str | Program]"  [arg-type]
+ mesonbuild/utils/universal.py:1913:27: error: Argument 1 to "__iadd__" of "list" has incompatible type "str | list[str]"; expected "Iterable[str | Program]"  [arg-type]
+ mesonbuild/cargo/cfg.py:60:27: error: Argument 1 to "enumerate" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ mesonbuild/cmdline.py:121:26: error: Argument 1 to "__init__" of "Action" has incompatible type "str"; expected "Sequence[str]"  [arg-type]
+ mesonbuild/cmdline.py:141:26: error: Argument 1 to "__init__" of "Action" has incompatible type "str"; expected "Sequence[str]"  [arg-type]
+ mesonbuild/cmake/common.py:85:14: error: Iterating over "str" is disallowed  [misc]
+ mesonbuild/cmake/common.py:85:14: note: This is because --disallow-str-iteration is enabled
+ mesonbuild/cmake/common.py:177:56: error: Argument 1 to "join" of "str" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ mesonbuild/compilers/cuda.py:219:24: error: Argument 1 to "set" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ mesonbuild/compilers/cuda.py:225:24: error: Argument 1 to "set" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ mesonbuild/cmake/interpreter.py:287:40: error: Iterating over "str" is disallowed  [misc]
+ mesonbuild/cmake/interpreter.py:287:40: note: This is because --disallow-str-iteration is enabled
+ mesonbuild/wrap/wrap.py:741:67: error: Iterating over "str" is disallowed  [misc]
+ mesonbuild/wrap/wrap.py:741:67: note: This is because --disallow-str-iteration is enabled
+ mesonbuild/interpreter/type_checking.py:149:37: error: Iterating over "str" is disallowed  [misc]
+ mesonbuild/interpreter/type_checking.py:149:37: note: This is because --disallow-str-iteration is enabled
+ mesonbuild/backend/backends.py:436:70: error: Argument 2 to "classify_unity_sources" has incompatible type "str"; expected "Sequence[File | str]"  [arg-type]
+ docs/refman/loaderbase.py:53:18: error: Iterating over "str" is disallowed  [misc]
+ docs/refman/loaderbase.py:53:18: note: This is because --disallow-str-iteration is enabled
+ mesonbuild/modules/rust.py:79:47: error: Iterating over "str | list[Any] | None" is disallowed  [misc]
+ mesonbuild/modules/rust.py:79:47: note: This is because --disallow-str-iteration is enabled
+ mesonbuild/modules/gnome.py:238:71: error: Iterating over "str | list[str]" is disallowed  [misc]
+ mesonbuild/modules/gnome.py:238:71: note: This is because --disallow-str-iteration is enabled
+ mesonbuild/modules/gnome.py:1885:29: error: Argument "install_dir" to "_make_mkenum_impl" of "GnomeModule" has incompatible type "str"; expected "Sequence[str | bool] | None"  [arg-type]
+ mesonbuild/modules/gnome.py:1908:29: error: Argument "install_dir" to "_make_mkenum_impl" of "GnomeModule" has incompatible type "str"; expected "Sequence[str | bool] | None"  [arg-type]
+ mesonbuild/modules/gnome.py:2035:25: error: Argument "install_dir" to "_make_mkenum_impl" of "GnomeModule" has incompatible type "str"; expected "Sequence[str | bool] | None"  [arg-type]
+ mesonbuild/modules/cuda.py:177:66: error: Iterating over "str | list[str]" is disallowed  [misc]
+ mesonbuild/modules/cuda.py:177:66: note: This is because --disallow-str-iteration is enabled
+ mesonbuild/mintro.py:192:17: error: Dict entry 0 has incompatible type "str": "str"; expected "str": "Sequence[str | UnknownValue]"  [dict-item]
+ mesonbuild/mintro.py:193:17: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Sequence[str | UnknownValue]"  [dict-item]
+ mesonbuild/mtest.py:96:14: error: Iterating over "str" is disallowed  [misc]
+ mesonbuild/mtest.py:96:14: note: This is because --disallow-str-iteration is enabled
+ mesonbuild/mtest.py:2243:32: error: Argument 1 to "update" of "set" has incompatible type "str"; expected "Iterable[str]"  [arg-type]

mypy (https://github.com/python/mypy)
+ mypyc/codegen/cstring.py:29: error: Iterating over "str" is disallowed  [misc]
+ mypyc/codegen/cstring.py:29: note: This is because --disallow-str-iteration is enabled
+ mypy/server/objgraph.py:54: error: Subclass of "Iterable[Any]" and "str" cannot exist: would have inconsistent method resolution order  [unreachable]
+ mypy/server/objgraph.py:54: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-unreachable for more info
+ mypy/util.py:505: error: Iterating over "str" is disallowed  [misc]
+ mypy/util.py:505: note: This is because --disallow-str-iteration is enabled
+ mypy/strconv.py:173: error: List item 0 has incompatible type "str"; expected "Sequence[object]"  [list-item]
+ mypy/strconv.py:173: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-list-item for more info
+ mypy/strconv.py:185: error: Argument 2 to "insert" of "list" has incompatible type "str"; expected "Sequence[object]"  [arg-type]
+ mypy/strconv.py:189: error: Argument 2 to "insert" of "list" has incompatible type "str"; expected "Sequence[object]"  [arg-type]
+ mypy/strconv.py:193: error: Argument 2 to "insert" of "list" has incompatible type "str"; expected "Sequence[object]"  [arg-type]
+ mypy/nodes.py:3903: error: Argument 1 to "append" of "list" has incompatible type "str"; expected "Sequence[str | list[str]]"  [arg-type]
+ mypy/nodes.py:3905: error: Argument 1 to "append" of "list" has incompatible type "str"; expected "Sequence[str | list[str]]"  [arg-type]
+ mypy/config_parser.py:374: error: Iterating over "str" is disallowed  [misc]
+ mypy/config_parser.py:374: note: This is because --disallow-str-iteration is enabled
+ mypy/messages.py:3309: error: Argument "a" to "SequenceMatcher" has incompatible type "str"; expected "Sequence[str]"  [arg-type]
+ mypy/messages.py:3309: error: Argument "b" to "SequenceMatcher" has incompatible type "str"; expected "Sequence[str]"  [arg-type]
+ mypy/report.py:341: error: Argument 1 to "list" has incompatible type "str"; expected "Iterable[str]"  [arg-type]

zulip (https://github.com/zulip/zulip)
+ zerver/lib/emoji_utils.py:21: error: Iterating over "str" is disallowed  [misc]
+ zerver/lib/emoji_utils.py:21: note: This is because --disallow-str-iteration is enabled
+ tools/lib/html_branches.py:59: error: Iterating over "str" is disallowed  [misc]
+ tools/lib/html_branches.py:59: note: This is because --disallow-str-iteration is enabled
+ zerver/lib/markdown/api_arguments_table_generator.py:234: error: Argument 1 to "__iadd__" of "list" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ zerver/lib/markdown/api_arguments_table_generator.py:241: error: Argument 1 to "__iadd__" of "list" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ zerver/lib/markdown/api_arguments_table_generator.py:247: error: Argument 1 to "__iadd__" of "list" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ zerver/lib/validator.py:459: error: Argument 1 to "equals" has incompatible type "str"; expected "Sequence[Collection[str]]"  [arg-type]
+ zerver/lib/validator.py:460: error: List item 1 has incompatible type "tuple[str, Callable[[str, object], str]]"; expected "tuple[str, Callable[[str, object], Sequence[Collection[str]]]]"  [list-item]
+ zerver/openapi/python_examples.py:1747: error: Dict entry 0 has incompatible type "str": "str"; expected "str": "Sequence[object]"  [dict-item]
+ zerver/openapi/python_examples.py:1760: error: Dict entry 0 has incompatible type "str": "str"; expected "str": "Sequence[object]"  [dict-item]
+ zerver/openapi/python_examples.py:1761: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Sequence[object]"  [dict-item]
+ zerver/openapi/python_examples.py:1763: error: Dict entry 3 has incompatible type "str": "str"; expected "str": "Sequence[object]"  [dict-item]
+ zerver/openapi/python_examples.py:1773: error: Dict entry 0 has incompatible type "str": "str"; expected "str": "Sequence[object]"  [dict-item]
+ zerver/openapi/python_examples.py:1774: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Sequence[object]"  [dict-item]
+ zerver/openapi/python_examples.py:1776: error: Dict entry 3 has incompatible type "str": "str"; expected "str": "Sequence[object]"  [dict-item]
+ zerver/lib/string_validation.py:32: error: Argument 1 to "enumerate" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ zerver/lib/mobile_auth_otp.py:18: error: Argument 1 to "zip" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ zerver/lib/mobile_auth_otp.py:18: error: Argument 2 to "zip" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ zerver/lib/mobile_auth_otp.py:48: error: Iterating over "str" is disallowed  [misc]
+ zerver/lib/mobile_auth_otp.py:48: note: This is because --disallow-str-iteration is enabled
+ zerver/lib/url_encoding.py:23: error: Iterating over "str" is disallowed  [misc]
+ zerver/lib/url_encoding.py:23: note: This is because --disallow-str-iteration is enabled
+ zerver/actions/default_streams.py:26: error: Iterating over "str" is disallowed  [misc]
+ zerver/actions/default_streams.py:26: note: This is because --disallow-str-iteration is enabled
+ corporate/lib/stripe.py:4403: error: List item 0 has incompatible type "str"; expected "Collection[str]"  [list-item]
+ corporate/lib/stripe.py:4847: error: List item 0 has incompatible type "str"; expected "Collection[str]"  [list-item]
+ corporate/lib/stripe.py:5296: error: List item 0 has incompatible type "str"; expected "Collection[str]"  [list-item]
+ zerver/lib/narrow.py:462: error: Argument 1 to "frozenset" has incompatible type "str"; expected "Iterable[str]"  [arg-type]
+ zerver/actions/user_settings.py:107: error: Dict entry 0 has incompatible type "str": "str"; expected "str": "Collection[str]"  [dict-item]
+ zerver/actions/user_settings.py:107: error: Dict entry 1 has incompatible type "str": "str"; expected "str": "Collection[str]"  [dict-item]
+ zerver/actions/streams.py:659: error: Dict entry 0 has incompatible type "str": "str"; expected "str": "Sequence[object]"  [dict-item]

... (truncated 2098 lines) ...```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow mypy to flag str matching against Sequence[str] as an error

2 participants